From d8b47db0fdcadf71bbc017933d1c06b83b78bf16 Mon Sep 17 00:00:00 2001 From: "kaf24@freefall.cl.cam.ac.uk" Date: Tue, 24 Aug 2004 10:29:53 +0000 Subject: [PATCH] bitkeeper revision 1.1159.1.100 (412b18a1W1qiW0mmY-hZTqXUTc-uLw) Force inlining on some functions that are designed to compile away. --- BitKeeper/etc/logging_ok | 1 + xen/include/asm-x86/mm.h | 8 ++++++-- xen/include/asm-x86/x86_32/uaccess.h | 4 ++-- xen/include/asm-x86/x86_64/uaccess.h | 6 +++--- xen/include/xen/config.h | 2 ++ 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/BitKeeper/etc/logging_ok b/BitKeeper/etc/logging_ok index 82e28a3652..fb81d871d0 100644 --- a/BitKeeper/etc/logging_ok +++ b/BitKeeper/etc/logging_ok @@ -19,6 +19,7 @@ iap10@striker.cl.cam.ac.uk iap10@tetris.cl.cam.ac.uk jws22@gauntlet.cl.cam.ac.uk jws@cairnwell.research +kaf24@freefall.cl.cam.ac.uk kaf24@labyrinth.cl.cam.ac.uk kaf24@plym.cl.cam.ac.uk kaf24@scramble.cl.cam.ac.uk diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index a16b5c47e5..9a26e29f08 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -364,7 +364,9 @@ void ptwr_reconnect_disconnected(unsigned long addr); void ptwr_flush_inactive(void); int ptwr_do_page_fault(unsigned long); -static inline void __cleanup_writable_pagetable(const int what) +static always_inline void +__cleanup_writable_pagetable( + const int what) { int cpu = smp_processor_id(); @@ -376,7 +378,9 @@ static inline void __cleanup_writable_pagetable(const int what) ptwr_flush_inactive(); } -static inline void cleanup_writable_pagetable(struct domain *d, const int what) +static always_inline void +cleanup_writable_pagetable( + struct domain *d, const int what) { if ( unlikely(VM_ASSIST(d, VMASST_TYPE_writable_pagetables)) ) __cleanup_writable_pagetable(what); diff --git a/xen/include/asm-x86/x86_32/uaccess.h b/xen/include/asm-x86/x86_32/uaccess.h index cba6b7e3cf..776639782c 100644 --- a/xen/include/asm-x86/x86_32/uaccess.h +++ b/xen/include/asm-x86/x86_32/uaccess.h @@ -331,7 +331,7 @@ unsigned long __copy_from_user_ll(void *to, const void __user *from, unsigned lo * Returns number of bytes that could not be copied. * On success, this will be zero. */ -static inline unsigned long +static always_inline unsigned long __copy_to_user(void __user *to, const void *from, unsigned long n) { if (__builtin_constant_p(n)) { @@ -369,7 +369,7 @@ __copy_to_user(void __user *to, const void *from, unsigned long n) * If some data could not be copied, this function will pad the copied * data to the requested size using zero bytes. */ -static inline unsigned long +static always_inline unsigned long __copy_from_user(void *to, const void __user *from, unsigned long n) { if (__builtin_constant_p(n)) { diff --git a/xen/include/asm-x86/x86_64/uaccess.h b/xen/include/asm-x86/x86_64/uaccess.h index ba3d49d8a8..29522716d5 100644 --- a/xen/include/asm-x86/x86_64/uaccess.h +++ b/xen/include/asm-x86/x86_64/uaccess.h @@ -243,7 +243,7 @@ extern unsigned long copy_to_user(void __user *to, const void *from, unsigned le extern unsigned long copy_from_user(void *to, const void __user *from, unsigned len); extern unsigned long copy_in_user(void __user *to, const void __user *from, unsigned len); -static inline int __copy_from_user(void *dst, const void __user *src, unsigned size) +static always_inline int __copy_from_user(void *dst, const void __user *src, unsigned size) { int ret = 0; if (!__builtin_constant_p(size)) @@ -272,7 +272,7 @@ static inline int __copy_from_user(void *dst, const void __user *src, unsigned s } } -static inline int __copy_to_user(void __user *dst, const void *src, unsigned size) +static always_inline int __copy_to_user(void __user *dst, const void *src, unsigned size) { int ret = 0; if (!__builtin_constant_p(size)) @@ -304,7 +304,7 @@ static inline int __copy_to_user(void __user *dst, const void *src, unsigned siz } -static inline int __copy_in_user(void __user *dst, const void __user *src, unsigned size) +static always_inline int __copy_in_user(void __user *dst, const void __user *src, unsigned size) { int ret = 0; if (!__builtin_constant_p(size)) diff --git a/xen/include/xen/config.h b/xen/include/xen/config.h index b90544d116..95101174ba 100644 --- a/xen/include/xen/config.h +++ b/xen/include/xen/config.h @@ -13,6 +13,8 @@ #define offsetof(_p,_f) ((unsigned long)&(((_p *)0)->_f)) #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#define always_inline __inline__ __attribute__ ((always_inline)) + /* syslog levels ==> nothing! */ #define KERN_NOTICE "" #define KERN_WARNING "" -- 2.30.2